#include "global.h"

unsigned char map[20][10] = {
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0}
};
unsigned char mapcolor[20][10] = {
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0}
};

// 方块库
unsigned char blocks[28][16] = {
    {0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0},
    {0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0},
    {0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0},
    {0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0}, // I
    {0,0,0,0,1,1,1,0,0,1,0,0,0,0,0,0},
    {0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0},
    {0,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0},
    {0,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0}, // T
    {0,0,0,0,1,1,1,0,1,0,0,0,0,0,0,0},
    {1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0},
    {0,0,0,0,0,0,1,0,1,1,1,0,0,0,0,0},
    {0,1,0,0,0,1,0,0,0,1,1,0,0,0,0,0}, // L
    {0,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0},
    {0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0},
    {0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0},
    {0,1,1,0,0,1,0,0,0,1,0,0,0,0,0,0}, // J
    {0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0},
    {1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0},
    {0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0},
    {1,0,0,0,1,1,0,0,0,1,0,0,0,0,0,0}, // S
    {0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0},
    {0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0},
    {0,0,0,0,1,1,0,0,0,1,1,0,0,0,0,0},
    {0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0}, // Z
    {0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0},
    {0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0},
    {0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0},
    {0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0} // O
};


void GlobalInit(void)
{
    TimerInit();
    DrawInit();
    InputInit();


}


void GlobalEnd(void)
{
    DrawEnd();
    InputEnd();
}